home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / comm / net / LT_UNIX255.lha / Shell / df.sh < prev    next >
Text File  |  1997-04-16  |  717b  |  35 lines

  1. # Este shell mostra o total de Kb de todo um ou mais diretorios
  2. # By: Cristian Robert Gallas, LITHIUN SOFTWARE
  3.  
  4. df="";r1="";r2="";w1="";w2=""
  5. dd="";result=""
  6. attribl df
  7. if df==""
  8.    echo "Erro de sintaxe:"
  9.    echo "df [DEVICE][DIRETORIO1] [DEVICE][DIRETORIO2]..."
  10.    ex df,r1,r2,w1,w2,dd,result
  11.    reset attribl
  12.    exit
  13. fi
  14. _inicio
  15. cut -c df," " > r1,r2
  16. df=${r2};w1="";w2=""
  17. if r1==""
  18.    echo " Total Bytes: ${result}"
  19.    ex df,r1,r2,w1,w2,dd,result
  20.    reset attribl
  21.    exit
  22. fi
  23. if nxist r1
  24.    echo "${r1}: not found..."
  25.    echo "Total Bytes: ${result}"
  26.    ex df,r1,r2,w1,w2,dd,result
  27.    reset attribl
  28.    exit
  29. fi
  30. dir mem ${r1}
  31. dd=:0
  32. cut -c dd,, > w1,w2
  33. result=result+${w1}
  34. goto inicio
  35.